Skip to main content

Goodbye Node js

ยท 3 min read
Yoofi Adom Appiah

May 27, 2009 an open source runtime environment was released. Node js revolutionized server-side applications and made countless impossibilities a reality. Now there is a new kid on the block.

Who is this new kid you speak of? ๐Ÿค”

Bun (and before you ask yes all the cool names have already been taken ๐Ÿ˜… ) is a new open source runtime environment created by Jared Sumner and over 40 contributors. This nerdy looking runtime environment really packs a punch. According to its creator it was made to:
  1. Start fast
  2. Have new levels of performance
  3. To be a great and complete tool.

On its beta release it's creator made a claim to be the an increadibly fast all all-in-one JavaScript

runtime.

Other

How fast you ask? ๐Ÿš€โ€‹

Here are the benchmark performances of Bun in comparision to Node js and Deno.


Other two Other Take a moment to soak in those number. And yes its legit well atleast according to Bun they are . It is not looking good for deno but i am sure Ryan Dahl and the team at deno have somethng up their sleeve.

How does it work? โš™๏ธโ€‹

Well Node Js uses googles V8 engine and has made it a great tool because of JIT (Just In Time) compilation. Now Bun uses the JavaScript Core which is considered to be faster. It was also written in a low level language Zig which is like C and Rust had a baby. Low level control of memory and lack of hidden control flow are the features of Zig that make Bun as fast as it is

Features ๐Ÿ“‹โ€‹

  • Native bundler that replaces Web Pack
  • Transpiler that enables TypesScript to be written out of the box
  • Task runner
  • npm client
  • Automatically loaded environment variable (bye bye require("dotenv").load()).
  • Native Test runner
  • 90% of the Node Api functions
  • and more

I don't think it can get better than this.
It is worth noting that since its a new tool it will be buggy. It will be best to use a WSL ( Windows Subsystem for Linux)

The introduction of Bun will definitely be a dream come true for many developers. However will this tool stand the test of time or become the next Windows 8. Hopefully not. If you would like more information on Bun click here Thanks for reading